package com.xtwy;

import com.aspose.words.Document;
import com.aspose.words.ImageSaveOptions;
import com.aspose.words.SaveFormat;

import java.io.FileOutputStream;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {

        long startTime=System.currentTimeMillis();   //获取开始时间
        try {
            Document doc = new Document("E:\\个人简历.docx");
            ImageSaveOptions iso = new ImageSaveOptions(SaveFormat.JPEG);
//
//            iso.Resolution = 128;
//            iso.
//            iso.PrettyFormat = true;
//            iso.UseAntiAliasing = true;
            String[] pathImgs=new String[doc.getPageCount()];
            for (int i = 0; i < doc.getPageCount(); i++) {
                iso.setPageIndex(i);
                doc.save("D:/test/test" + i + ".jpg", iso);
                pathImgs[i]="D:/test/test" + i + ".jpg";
            }
            //
            ImageHandleHelper.mergeImage(pathImgs,2,"D:\\a.jpg");
            //二维码合成
            ImageHandleHelper.overlapImage("D:\\a.jpg","D:\\abc.jpg","D:\\ddd.jpg");
        }catch (Exception ex){
            System.out.print("aaaa"+ex);
        }
        long endTime=System.currentTimeMillis(); //获取结束时间

        System.out.println("程序运行时间： "+(endTime-startTime)+"ms");
    }
}
